package com.ww.companyCabinetSystem.dao.impl;

import java.util.List;

import org.springframework.stereotype.Component;

import com.ww.companyCabinetSystem.dao.IRecruitDao;
import com.ww.companyCabinetSystem.model.bo.MRecruitBo;
import com.ww.companyCabinetSystem.utils.BeanUtils;
import com.ww.keyIdAutomaticGeneration.factory.KeyIdGenerationFactory;
@Component("recruit")
public class RecruitDaoImpl extends BaseDaoImpl implements IRecruitDao {

	@Override
	public boolean insertRecruit(MRecruitBo bo) {
		String keyId=KeyIdGenerationFactory.createKeyId();
		bo.setKeyId(keyId);
		BeanUtils.notNull(bo);
		return this.sqlSession.insert("com.ww.companyCabinetSystem.dao.IRecruitDao.insertRecruit",
				bo)>0;
	}

	@Override
	public boolean updateRecruit(MRecruitBo bo) {
		// TODO Auto-generated method stub
		return this.sqlSession.update("com.ww.companyCabinetSystem.dao.IRecruitDao.updateRecruit",
				bo)>0;
	}

	@Override
	public List<MRecruitBo> selectByConfitions(MRecruitBo bo) {
		// TODO Auto-generated method stub
		return this.sqlSession.selectList("com.ww.companyCabinetSystem.dao.IRecruitDao.selectRecruit",
				bo);
	}

}
